/**
 *
 */
import Util;
import ROAUtil;
import Credential;
import AccessTokenCredential;

type @domainId = string
type @accessTokenCredential = AccessTokenCredential
type @endpoint = string
type @protocol = string
type @nickname = string
type @userAgent = string
type @credential = Credential

model RuntimeOptions {
  autoretry?: boolean(description='whether to try again', name='autoretry'),
  ignoreSSL?: boolean(description='ignore SSL validation', name='ignoreSSL'),
  maxAttempts?: number(description='maximum number of retries', name='maxAttempts'),
  backoffPolicy?: string(description='backoff policy', name='backoffPolicy'),
  backoffPeriod?: number(description='backoff period', name='backoffPeriod'),
  readTimeout?: number(description='read timeout', name='readTimeout'),
  connectTimeout?: number(description='connect timeout', name='connectTimeout'),
  httpProxy?: string(description='http proxy url', name='httpProxy'),
  httpsProxy?: string(description='https Proxy url', name='httpsProxy'),
  noProxy?: string(description='agent blacklist', name='noProxy'),
  maxIdleConns?: number(description='maximum number of connections', name='maxIdleConns'),
  localAddr?: string(description='local addr', name='localAddr'),
  socks5Proxy?: string(description='SOCKS5 proxy', name='socks5Proxy'),
  socks5NetWork?: string(description='SOCKS5 netWork', name='socks5NetWork'),
}

model Config {
  endpoint?: string,
  domainId?: string,
  clientId?: string,
  refreshToken?: string,
  clientSecret?: string,
  accessToken?: string,
  expireTime?: string,
  protocol?: string,
  type?: string,
  securityToken?: string,
  accessKeyId?: string,
  accessKeySecret?: string,
  nickname?: string,
  userAgent?: string,
}


init(config: Config){
  if (Util.isUnset(config)) {
    throw {
      name = "ParameterMissing",
      message = "'config' can not be unset"
    };
  }

  if (!Util.empty(config.accessToken) || !Util.empty(config.refreshToken)) {
    var accessConfig = new AccessTokenCredential.Config{
      accessToken =  config.accessToken,
      endpoint = config.endpoint,
      domainId =  config.domainId,
      clientId = config.clientId,
      refreshToken = config.refreshToken,
      clientSecret =  config.clientSecret,
      expireTime = config.expireTime,
    };
    @accessTokenCredential = new AccessTokenCredential(accessConfig);
  }
  if (!Util.empty(config.accessKeyId)) {
    if (Util.empty(config.type)) {
      config.type = 'access_key';
    }
    var credentialConfig = new Credential.Config{
      accessKeyId =  config.accessKeyId,
      type = config.type,
      accessKeySecret =  config.accessKeySecret,
      securityToken = config.securityToken,
    };
    @credential = new Credential(credentialConfig);
  }
  @endpoint = config.endpoint;
  @protocol = config.protocol;
  @userAgent = config.userAgent;
  @nickname = config.nickname;
  @domainId = config.domainId;
}

model CancelLinkRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CancelLinkRequest(description='body', name='body'),
}

model CancelLinkModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 取消绑定关系，生成新用户，返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api cancelLink(request: CancelLinkRequestModel, runtime: RuntimeOptions): CancelLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/cancel_link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ConfirmLinkRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ConfirmLinkRequest(description='body', name='body'),
}

model ConfirmLinkModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 确认绑定关系, 成功后返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api confirmLink(request: ConfirmLinkRequestModel, runtime: RuntimeOptions): ConfirmLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/confirm_link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ChangePasswordRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: DefaultChangePasswordRequest(description='body', name='body'),
}

model ChangePasswordModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 修改手机登录密码，密码必须包含数字和字母，长度8-20个字符
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api changePassword(request: ChangePasswordRequestModel, runtime: RuntimeOptions): ChangePasswordModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/default/change_password`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SetPasswordRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: DefaultSetPasswordRequest(description='body', name='body'),
}

model SetPasswordModel {
  headers?: map[string]string(description='headers', name='headers'),
}

/**
 * 设置手机登录密码，密码必须包含数字和字母，长度8-20个字符
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api setPassword(request: SetPasswordRequestModel, runtime: RuntimeOptions): SetPasswordModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/default/set_password`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model VerifyCodeRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: VerifyCodeRequest(description='body', name='body'),
}

model VerifyCodeModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: VerifyCodeResponse(description='body', name='body'),
}

/**
 * 校验手机短信验证码，用于重置密码时校验手机，通过校验后返回state，可通过state重新设置密码
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api verifyCode(request: VerifyCodeRequestModel, runtime: RuntimeOptions): VerifyCodeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/default/verify_code`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetAccessTokenByLinkInfoRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetAccessTokenByLinkInfoRequest(description='body', name='body'),
}

model GetAccessTokenByLinkInfoModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 管理员通过账号信息直接获取用户的访问令牌
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getAccessTokenByLinkInfo(request: GetAccessTokenByLinkInfoRequestModel, runtime: RuntimeOptions): GetAccessTokenByLinkInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_access_token_by_link_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetCaptchaRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetCaptchaRequest(description='body', name='body'),
}

model GetCaptchaModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: Captcha(description='body', name='body'),
}

/**
 * 获取图片验证码，用于人机校验，默认不需要
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getCaptcha(request: GetCaptchaRequestModel, runtime: RuntimeOptions): GetCaptchaModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_captcha`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLinkInfoRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetByLinkInfoRequest(description='body', name='body'),
}

model GetLinkInfoModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: LinkInfoResponse(description='body', name='body'),
}

/**
 * 获取用户认证方式详情
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getLinkInfo(request: GetLinkInfoRequestModel, runtime: RuntimeOptions): GetLinkInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_link_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLinkInfoByUserIdRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetLinkInfoByUserIDRequest(description='body', name='body'),
}

model GetLinkInfoByUserIdModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: LinkInfoListResponse(description='body', name='body'),
}

/**
 * 获取用户的所有绑定信息
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getLinkInfoByUserId(request: GetLinkInfoByUserIdRequestModel, runtime: RuntimeOptions): GetLinkInfoByUserIdModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_link_info_by_user_id`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetPublicKeyRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetAppPublicKeyRequest(description='body', name='body'),
}

model GetPublicKeyModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetAppPublicKeyResponse(description='body', name='body'),
}

/**
 * 获取公钥，用于加密对称密钥
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getPublicKey(request: GetPublicKeyRequestModel, runtime: RuntimeOptions): GetPublicKeyModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_public_key`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model LinkRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountLinkRequest(description='body', name='body'),
}

model LinkModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 绑定用户认证方式
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
api link(request: LinkRequestModel, runtime: RuntimeOptions): LinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CheckExistRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileCheckExistRequest(description='body', name='body'),
}

model CheckExistModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileCheckExistResponse(description='body', name='body'),
}

/**
 * 查询手机号是否已被注册
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api checkExist(request: CheckExistRequestModel, runtime: RuntimeOptions): CheckExistModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/check_exist`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model LoginRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileLoginRequest(description='body', name='body'),
}

model LoginModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 通过手机号+短信或密码登录，返回刷新令牌和访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api login(request: LoginRequestModel, runtime: RuntimeOptions): LoginModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/login`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model RegisterRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileRegisterRequest(description='body', name='body'),
}

model RegisterModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 通过手机号+短信验证码注册账号
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
api register(request: RegisterRequestModel, runtime: RuntimeOptions): RegisterModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/register`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model MobileSendSmsCodeRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileSendSmsCodeRequest(description='body', name='body'),
}

model MobileSendSmsCodeModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: MobileSendSmsCodeResponse(description='body', name='body'),
}

/**
 * 发送短信验证码，用于登录、注册、修改密码、绑定等
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api mobileSendSmsCode(request: MobileSendSmsCodeRequestModel, runtime: RuntimeOptions): MobileSendSmsCodeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/send_sms_code`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AccountRevokeRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: RevokeRequest(description='body', name='body'),
}

model AccountRevokeModel {
  headers?: map[string]string(description='headers', name='headers'),
}

/**
 * 用户退出登录
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api accountRevoke(request: AccountRevokeRequestModel, runtime: RuntimeOptions): AccountRevokeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/revoke`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AccountTokenRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: TokenRequest(description='body', name='body'),
}

model AccountTokenModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccountAccessTokenResponse(description='body', name='body'),
}

/**
 * 用户通过刷新令牌（refresh_token）获取访问令牌（access_token）
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api accountToken(request: AccountTokenRequestModel, runtime: RuntimeOptions): AccountTokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * 
 */
model AccessTokenResponse {
  accessToken: string(name='access_token', description='用于调用业务接口的accessToken', example='cnskjajkahwdhwialsnd'),
  defaultDriveId: string(name='default_drive_id', description='Default Drive ID', example='100'),
  expireTime: string(name='expire_time', description='accessToken过期时间，ISO时间', example='2019-09-01T06:57:48.813Z'),
  expiresIn: long(name='expires_in', description='accessToken过期时间，单位秒', example=3600, format='int64'),
  refreshToken: string(name='refresh_token', description='用于刷新accessToken', example='cnskjajkahwdhwialsnd'),
  role: string(name='role', description='当前用户角色', example='user'),
  tokenType: string(name='token_type', description='accessToken类型，Bearer', example='Bearer'),
  userId: string(name='user_id', description='当前用户ID', example='DING-xxxxx'),
}

/**
 * 
 */
model AccountAccessTokenResponse {
  accessToken: string(name='access_token', description='用于调用业务接口的accessToken', example='cnskjajkahwdhwialsnd'),
  avatar?: string(name='avatar', description='当前用户头像', example='cherry'),
  dataPinSaved?: boolean(name='data_pin_saved', description='用户的数据密码是否保存服务端', example=true),
  dataPinSetup?: boolean(name='data_pin_setup', description='用户的数据密码是否设置过', example=true),
  defaultDriveId?: string(name='default_drive_id', description='Default Drive ID', example='100'),
  existLink?: [ LinkInfo ](name='exist_link', description='当前用户已存在的登录方式', example='', items='{"$ref":"#/definitions/LinkInfo"}'),
  expireTime?: string(name='expire_time', description='accessToken过期时间，ISO时间', example='2019-09-01T06:57:48.813Z'),
  expiresIn?: long(name='expires_in', description='accessToken过期时间，单位秒', example=3600, format='int64'),
  isFirstLogin?: boolean(name='is_first_login', description='用户是否为第一次登录', example=true),
  needLink: boolean(name='need_link', description='是否需要绑定', example=false),
  nickName?: string(name='nick_name', description='当前用户昵称', example='cherry'),
  refreshToken?: string(name='refresh_token', description='用于刷新accessToken', example='cnskjajkahwdhwialsnd'),
  role?: string(name='role', description='当前用户角色', example='user'),
  state?: string(name='state', description='临时权限，用于登录成功后设置密码', example='klafhjas-asdasd-asd-as-d-asd-asd-asdasd'),
  tokenType?: string(name='token_type', description='accessToken类型，Bearer', example='Bearer'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='当前用户ID', example='DING-xxxxx'),
  userName?: string(name='user_name', description='当前用户名', example='cherry'),
}

/**
 * 
 */
model AccountLinkRequest {
  detail?: string(name='detail', description='账号信息', example='{name:jack,age:20}'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  status?: string(name='status', description='状态', example='normal'),
  type: string(name='type', description='认证类型', example='mobile'),
  userId: string(name='user_id', description='绑定的user_id', example='123987123617823'),
}

/**
 * 
 */
model AuthorizeRequest {
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  LoginType?: string(name='LoginType', default='ding', description='鉴权方式，目前支持ding,ram鉴权', example='ding'),
  RedirectUri: string(name='RedirectUri', description='回调地址, 此处填写创建App时填写的回调地址', example='https://app.com/callback'),
  ResponseType: string(name='ResponseType', description='返回类型, 只能填写code', example='code'),
  Scope?: [ string ](name='Scope', description='申请的权限列表, 默认为所有权限', items='{"type":"string"}'),
  State?: string(name='State', description='用户自定义字段，会在鉴权成功后的callback带回'),
}

/**
 * Base file response
 */
model BaseCCPFileResponse {
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * Base drive response
 */
model BaseDriveResponse {
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: long(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: long(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * Base file response
 */
model BaseOSSFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * List share response
 */
model BaseShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 
 */
model BatchSubResponse {
  body?: object(name='body', additionalProperties='{"type":"object"}', description='body 子请求的返回结果，可参考对于子请求文档 json 字符串', example='{"drive_id":"101","file_id":"xxxxxx"}'),
  id?: string(name='id', description='id 请求带过来的id, 可以跟 request 进行关联', example='"1"'),
  status?: long(name='status', description='status 子请求的返回状态码，可参考对于子请求文档', example=200, format='int64'),
}

/**
 * batch operation response
 */
model CCPBatchResponse {
  responses?: [ BatchSubResponse ](name='responses', description='responses 返回结果合集', items='{"$ref":"#/definitions/BatchSubResponse"}'),
}

/**
 * complete file response
 */
model CCPCompleteFileResponse {
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 文件拷贝 response
 */
model CCPCopyFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * Create file response
 */
model CCPCreateFileResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  exist?: boolean(name='exist', description='exist
type: boolean', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d79206586bb5dd69fb34c349282718146c55da7', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  fileName?: string(name='file_name', description='file_name', example='test.txt', maxLength=255, minLength=1),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  rapidUpload?: boolean(name='rapid_upload', description='rapid_upload
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsUploadInfo?: object(name='streams_upload_info', additionalProperties='{"$ref":"#/definitions/StreamUploadInfo"}', description='streams_upload_info'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * 删除文件 response
 */
model CCPDeleteFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 批量删除文件 response
 */
model CCPDeleteFilesResponse {
  deletedFileIdList?: [ string ](name='deleted_file_id_list', description='deleted_file_id_list', example='', items='{"type":"string"}'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * Get AsyncTask Response
 */
model CCPGetAsyncTaskResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id
type:string', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  message?: string(name='message', description='message', example='task is running'),
  state?: string(name='state', description='state', enum='Running, Failed, Succeed', example='success'),
}

/**
 * 获取download url response
 */
model CCPGetDownloadUrlResponse {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  method?: string(name='method', description='method', example='GET'),
  size?: long(name='size', description='size', example=102400, format='int64'),
  streamsUrl?: object(name='streams_url', additionalProperties='{"type":"string"}', description='streams url info'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * 根据路径获取文件元数据response
 */
model CCPGetFileByPathResponse {
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 获取文件元数据response
 */
model CCPGetFileResponse {
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * Get UploadUrl Response
 */
model CCPGetUploadUrlResponse {
  createAt?: string(name='create_at', description='created_at', example='2019-09-11T16:34:36.977Z'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
}

/**
 * 获取视频雪碧图地址 url response
 */
model CCPGetVideoPreviewSpriteURLResponse {
  col?: long(name='col', description='col', example=10, format='int64'),
  count?: long(name='count', description='count', example=4, format='int64'),
  frameCount?: long(name='frame_count', description='frame_count', example=450, format='int64'),
  frameHeight?: long(name='frame_height', description='frame_height', example=90, format='int64'),
  frameWidth?: long(name='frame_width', description='frame_width', example=160, format='int64'),
  row?: long(name='row', description='row', example=10, format='int64'),
  spriteUrlList?: [ string ](name='sprite_url_list', description='sprite_url_list', example='[https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt]', items='{"type":"string"}'),
}

/**
 * 获取视频文件播放 url response
 */
model CCPGetVideoPreviewURLResponse {
  previewUrl?: string(name='preview_url', description='preview_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * List file response
 */
model CCPListFileResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 获取签名 response
 */
model CCPListUploadedPartResponse {
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  nextPartNumberMarker?: string(name='next_part_number_marker', description='next_part_number_marker', example='4'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
  uploadedParts?: [ UploadPartInfo ](name='uploaded_parts', description='uploaded_parts', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
}

/**
 * 文件移动 response
 */
model CCPMoveFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * scan file meta response
 */
model CCPScanFileMetaResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * search file response
 */
model CCPSearchFileResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 更新文件元数据 response
 */
model CCPUpdateFileMetaResponse {
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 
 */
model CancelLinkRequest {
  temporaryToken: string(name='temporary_token', description='待绑定的临时token，此token只能访问绑定、取消绑定接口', example='ey***s='),
}

/**
 * 
 */
model Captcha {
  captcha: string(name='captcha', description='图片验证码，base64格式', example='iVBORw0KGgoAAAANSUhEUgAAAFAAAAAaCAIAAACvsEzwAAABRElEQVR42t3YsQ4CIQwA0CZ+i36Bg5uTo1/gqquDTvf1JwkJqRR7vZYCJ2HClOMBVw5h/i7P9yvU+X8LFFsju728wRNhcQR+gyj27G2GtQGHxy5USaN6PV1n2Qt8Ou6ZKllPJ/MQ4PN0CzXrs9i4jS2dIelKMuBse18vd1zdweHZdnC2V3kwDsm0OnYHMDVLtnQICbZ0XuIpqAamaaMjmGbvOAV0Fmqew7XAmXlV0kqButcYhDs5PqYiGA9dDm6atCK7bpbGx5Jknxszlj5pYR5t8QMX8b5gLMSVCZGfw4svdtHsDqZmPooHJxte5NTCnx3twKvKIhgLcaXrSbP0iGBhIK/99aXlnrQst1/7BajDt7Txxl/rrqvuBOaGJY3Szt4GOBuoka2LhQYw/ic1eyww/5eV95x229IDmqHlS1vdrOjkA5iK2BYUhM2zAAAAAElFTkSuQmCC'),
  captchaFormat: string(name='captcha_format', description='图片格式', example='png'),
  captchaId: string(name='captcha_id', description='图片验证码ID', example='f4690fc255e2fb24c10ede079d3802b4cClRimRh67Q'),
}

/**
 * 
 */
model ConfirmLinkRequest {
  temporaryToken: string(name='temporary_token', description='待绑定的临时token，此token只能访问绑定、取消绑定接口', example='ey***s='),
}

/**
 * 
 */
model CorsRule {
  allowedHeader?: [ string ](name='allowed_header', description='AllowedHeader', example='h*', items='{"type":"string"}'),
  allowedMethod?: [ string ](name='allowed_method', description='AllowedMethod', example='PUT, GET', items='{"type":"string"}'),
  allowedOrigin?: [ string ](name='allowed_origin', description='AllowedOrigin', example='*', items='{"type":"string"}'),
  exposeHeader?: [ string ](name='expose_header', description='ExposeHeader', example='ETag', items='{"type":"string"}'),
  maxAgeSeconds?: long(name='max_age_seconds', description='MaxAgeSeconds', example=0, format='int64'),
}

/**
 * Create drive response
 */
model CreateDriveResponse {
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
}

/**
 * Create share response
 */
model CreateShareResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 
 */
model DefaultChangePasswordRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  encryptedKey: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  newPassword: string(name='new_password', description='新密码，必须包含数字和字母，长度8-20个字符', example='123456,Abc'),
  phoneNumber: string(name='phone_number', description='手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  state: string(name='state', description='修改密码的临时授权码', example='csjanwia'),
}

/**
 * 
 */
model DefaultSetPasswordRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  encryptedKey: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  newPassword: string(name='new_password', description='新密码，必须包含数字和字母，长度8-20个字符，使用AES-256对称加密后传输（CBC模式, 填充算法为PKCS7Padding，生成base64字符串）', example='123456,Abc'),
  state: string(name='state', description='修改密码的临时授权码', example='abc'),
}

/**
 * delete drive response
 */
model DeleteDriveResponse {
}

/**
 * 
 */
model DeviceAuthorizeRequest {
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  DeviceInfo?: string(name='DeviceInfo', description='设备信息，用于用户识别设备'),
  DeviceName: string(name='DeviceName', description='设备名，实现方需保证不同设备的设备名不重复（推荐用硬件名称+硬件型号作为设备名）'),
  LoginType?: string(name='LoginType', default='ding', description='鉴权方式，目前支持ding,ram鉴权', example='ding'),
  Scope?: [ string ](name='Scope', description='申请的权限列表, 默认为所有权限', items='{"type":"string"}'),
}

/**
 * the file op info
 */
model FileDeltaResponse {
  currentCategory?: string(name='current_category'),
  file?: BaseCCPFileResponse(name='file'),
  fileId?: string(name='file_id'),
  op?: string(name='op'),
}

/**
 * 
 */
model GetAccessTokenByLinkInfoRequest {
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  type: string(name='type', description='认证类型', example='mobile'),
}

/**
 * 
 */
model GetAppPublicKeyRequest {
  appId?: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
}

/**
 * 
 */
model GetByLinkInfoRequest {
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  type: string(name='type', description='认证类型', example='mobile'),
}

/**
 * 
 */
model GetCaptchaRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
}

/**
 * Get drive response
 */
model GetDriveResponse {
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: long(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: long(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * get last file op cursor response
 */
model GetLastCursorResponse {
  cursor?: string(name='cursor'),
}

/**
 * 
 */
model GetLinkInfoByUserIDRequest {
  userId: string(name='user_id', description='user ID', example='123987123617823'),
}

/**
 * 
 */
model GetPublicKeyResponse {
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  keyPairId?: string(name='key_pair_id'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
}

/**
 * Get share response
 */
model GetShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 
 */
model ImageMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  district?: string(name='district', description='district', example='余杭区'),
  exif?: string(name='exif', description='exif json string'),
  faces?: string(name='faces', description='faces json string'),
  height?: long(name='height', default=0, description='height', example=720, format='int64'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  storyImageScore?: number(name='story_image_score', description='story_image_score', format='double'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  width?: long(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * 
 */
model LinkInfo {
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity?: string(name='identity', description='当前用户已存在的登录标识', example='15208345000'),
  type?: string(name='type', description='当前用户已存在的登录方式', example='mobile'),
}

/**
 * 
 */
model LinkInfoListResponse {
  items: [ LinkInfoResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/LinkInfoResponse"}'),
}

/**
 * 
 */
model LinkInfoResponse {
  authenticationType: string(name='authentication_type', description='认证类型', example='mobile'),
  createdAt: long(name='created_at', description='创建时间', example=1556163159820, format='int64'),
  domainId: string(name='domain_id', description='Domain ID', example='5000'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208345000'),
  lastLoginTime: long(name='last_login_time', description='最后登录时间', example=1556163159820, format='int64'),
  status: string(name='status', description='状态', example='normal'),
  userId: string(name='user_id', description='用户ID', example='00016a587b62b50003deea299a4f5b50'),
}

/**
 * list drive response
 */
model ListDriveResponse {
  items?: [ BaseDriveResponse ](name='items', description='Drive 列表', items='{"$ref":"#/definitions/BaseDriveResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='marker'),
}

/**
 * list file op response
 */
model ListFileDeltaResponse {
  cursor?: string(name='cursor', description='cursor', example='abc'),
  hasMore?: boolean(name='has_more', description='has_more', example=false),
  items?: [ FileDeltaResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/FileDeltaResponse"}', maxItems=100),
}

/**
 * List share response
 */
model ListShareResponse {
  items?: [ BaseShareResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseShareResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker'),
}

/**
 * List storage file
 */
model ListStoreFileResponse {
  items?: [ StoreFile ](name='items', description='items
file list', example='', items='{"$ref":"#/definitions/StoreFile"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List storage
 */
model ListStoreResponse {
  items?: [ StoreItemResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/StoreItemResponse"}'),
}

/**
 * 
 */
model LoginByCodeRequest {
  accessToken?: string(name='access_token', description='鉴权后返回的accessToken，淘宝登录需要此字段', example='csaklidwasdhjwid'),
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  authCode?: string(name='auth_code', description='鉴权后返回的AuthCode，支付宝登录需要此字段', example='csaklidwasdhjwid'),
  type: string(name='type', description='鉴权类型，淘宝、支付宝', enum='taobao, alipay', example='taobao'),
}

/**
 * 
 */
model MobileCheckExistRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
}

/**
 * 
 */
model MobileCheckExistResponse {
  isExist: boolean(name='is_exist', description='当前手机号是否存在', example=true),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
}

/**
 * 
 */
model MobileLoginRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  autoRegister?: boolean(name='auto_register', default=false, description='是否自动注册用户，使用密码登录此参数不生效', example=false),
  captchaId?: string(name='captcha_id', description='图片验证码ID, 密码登录需要此参数', example='abc'),
  captchaText?: string(name='captcha_text', description='用户输入的验证码值, 密码登录需要此参数', example='abc'),
  encryptedKey?: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  password?: string(name='password', description='登录密码, 传入此参数则忽略短信验证码，不传此参数则默认使用短信登录。', example='123456'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode?: string(name='sms_code', description='短信验证码内容，使用密码登录此参数不生效', example='1234'),
  smsCodeId?: string(name='sms_code_id', description='短信验证码ID，使用密码登录此参数不生效', example='csjanwia'),
}

/**
 * 
 */
model MobileRegisterRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode: string(name='sms_code', description='短信验证码内容', example='1234'),
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
}

/**
 * 
 */
model MobileSendSmsCodeRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  captchaId?: string(name='captcha_id', description='图片验证码ID', example='abc'),
  captchaText?: string(name='captcha_text', description='用户输入的验证码值', example='abc'),
  phoneNumber: string(name='phone_number', description='待发送验证短信的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  type: string(name='type', description='验证码用途, 可下发: login、register、change_password', example='login'),
}

/**
 * 
 */
model MobileSendSmsCodeResponse {
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
}

/**
 * complete file response
 */
model OSSCompleteFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  crc?: string(name='crc', description='crc'),
}

/**
 * 文件拷贝 response
 */
model OSSCopyFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z-]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='drive_id', example='test001', pattern='[a-z0-9A-Z]+'),
}

/**
 * Create file response
 */
model OSSCreateFileResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9]+'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * 删除文件 response
 */
model OSSDeleteFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[a-z0-9A-Z]+'),
}

/**
 * 批量删除文件 response
 */
model OSSDeleteFilesResponse {
  deletedFileIdList?: [ string ](name='deleted_file_id_list', description='deleted_file_id_list', example='', items='{"type":"string"}'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9]+'),
}

/**
 * 获取download url response
 */
model OSSGetDownloadUrlResponse {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  method?: string(name='method', description='method', example='GET'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * 获取文件元数据response
 */
model OSSGetFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 获取secure url response
 */
model OSSGetSecureUrlResponse {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * Get UploadUrl Response
 */
model OSSGetUploadUrlResponse {
  createAt?: string(name='create_at', description='created_at', example='2019-09-11T16:34:36.977Z'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
}

/**
 * List file response
 */
model OSSListFileResponse {
  items?: [ BaseOSSFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseOSSFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 获取签名 response
 */
model OSSListUploadedPartResponse {
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  nextPartNumberMarker?: string(name='next_part_number_marker', description='next_part_number_marker', example='4'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
  uploadedParts?: [ UploadPartInfo ](name='uploaded_parts', description='uploaded_parts', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
}

/**
 * 文件移动 response
 */
model OSSMoveFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z-]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='drive_id', example='test001', pattern='[a-z0-9A-Z]+'),
}

/**
 * search file response
 */
model OSSSearchFileResponse {
  items?: [ BaseOSSFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseOSSFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 更新文件元数据 response
 */
model OSSUpdateFileMetaResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: long(name='size', description='Size', example=1024, format='int64', maximum=53687091200, minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * DRM License response
 */
model OSSVideoDRMLicenseResponse {
  data: string(name='data', description='drm_data', example='xxx'),
  states: long(name='states', description='states', example=0, format='int64'),
}

/**
 * 转码接口response
 */
model OSSVideoDefinitionResponse {
  definitionList?: [ string ](name='definition_list', description='definition_list', example='', items='{"type":"string"}'),
  frameRate?: string(name='frame_rate', description='frame_rate', example='30000/1001'),
}

/**
 * 转码接口response
 */
model OSSVideoTranscodeResponse {
  definitionList?: [ string ](name='definition_list', description='definition_list', example='', items='{"type":"string"}'),
  duration?: long(name='duration', description='duration', example=100, format='int64'),
  hlsTime?: long(name='hls_time', description='hls_time', example=10, format='int64'),
}

/**
 * Pre hash check Response
 */
model PreHashCheckSuccessResponse {
  code?: string(name='code', description='code'),
  fileName?: string(name='file_name', description='file_name'),
  message?: string(name='message', description='message'),
  parentFileId: string(name='parent_file_id', description='parent_file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  preHash?: string(name='pre_hash', description='pre_hash'),
}

/**
 * 
 */
model RevokeRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  refreshToken: string(name='refresh_token', description='refresh token, 登录时返回的', example='ybb3WJy2CwXHoM6hBcydGlvzMoJkFpkk'),
}

/**
 * 
 */
model SharePermissionPolicy {
  filePath?: string(name='file_path'),
  permissionInheritable?: boolean(name='permission_inheritable'),
  permissionList?: [ string ](name='permission_list', items='{"type":"string"}'),
  permissionType?: string(name='permission_type'),
}

/**
 * 
 */
model StoreFile {
  domainId?: string(name='domain_id'),
  name?: string(name='name'),
  parentFilePath?: string(name='parent_file_path'),
  storeId?: string(name='store_id'),
  type?: string(name='type'),
}

/**
 * 
 */
model StoreItemResponse {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速域名', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='ccp-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  customizedEndpoint?: string(name='customized_endpoint', description='用户自定义绑定存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  domainId?: string(name='domain_id'),
  endpoint: string(name='endpoint', description='存储访问地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='内网存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='cdjaksbwuiqbxuiassd'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model StreamInfo {
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 
 */
model StreamUploadInfo {
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  preRapidUpload?: boolean(name='pre_rapid_upload', description='pre_rapid_upload
type: boolean', example=false),
  rapidUpload?: boolean(name='rapid_upload', description='rapid_upload
type: boolean', example=false),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * 
 */
model TokenRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  grantType: string(name='grant_type', description='只能填refresh_token', example='refresh_token'),
  refreshToken: string(name='refresh_token', description='refresh token, 登录时返回的', example='ybb3WJy2CwXHoM6hBcydGlvzMoJkFpkk'),
}

/**
 * Update drive response
 */
model UpdateDriveResponse {
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: long(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: long(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * Update share response
 */
model UpdateShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 
 */
model UploadPartInfo {
  etag?: string(name='etag', description='etag', example='0CC175B9C0F1B6A831C399E269772661'),
  partNumber?: long(name='part_number', description='PartNumber', example=1, format='int64', maximum=1, minimum=10000, pattern='[0-9]+'),
  partSize?: long(name='part_size', description='PartSize：', example=1024, format='int64', maximum=5368709120, minimum=102400),
  uploadUrl?: string(name='upload_url', description='upload_url', example='https://ccp.data.aliyuncs.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E269772661'),
}

/**
 * 
 */
model UserAuthentication {
  AuthenticationType: string(name='AuthenticationType', description='认证类型', example='mobile'),
  CreatedAt: long(name='CreatedAt', description='创建时间', example=1556163159820, format='int64'),
  Detail: string(name='Detail', description='详情', example='{name:abc}'),
  DomainID: string(name='DomainID', description='Domain ID', example='5000'),
  Identity: string(name='Identity', description='唯一身份标识', example='15208345000'),
  LastLoginTime: long(name='LastLoginTime', description='最后登录时间', example=1556163159820, format='int64'),
  Status: string(name='Status', description='状态', example='normal'),
  UserID: string(name='UserID', description='用户ID', example='00016a587b62b50003deea299a4f5b50'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
}

/**
 * 
 */
model VerifyCodeRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  phoneNumber: string(name='phone_number', description='手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode: string(name='sms_code', description='短信验证码内容', example='1234'),
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
  verifyType?: string(name='verify_type', description='需要被校验内容的类型', example='password'),
}

/**
 * 
 */
model VerifyCodeResponse {
  state: string(name='state', description='修改密码的临时授权码', example='csjanwia'),
}

/**
 * 
 */
model VideoMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  district?: string(name='district', description='district', example='余杭区'),
  duration?: string(name='duration', description='duration 单位 秒', example='"7704.573000"'),
  height?: long(name='height', default=0, description='height', example=720, format='int64'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  width?: long(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * 
 */
model VideoPreviewResponse {
  audioFormat?: string(name='audio_format', description='audio_format', example='"AAC"'),
  bitrate?: string(name='bitrate', description='bitrate', example='"39101896"'),
  duration?: string(name='duration', description='duration', example='"8053"'),
  frameRate?: string(name='frame_rate', description='frame_rate', example='"239.877"'),
  height?: long(name='height', description='height', example=1280, format='int64'),
  spriteInfo?: VideoPreviewSprite(name='sprite_info'),
  templateList?: [ VideoPreviewTranscode ](name='template_list', description='template_list', items='{"$ref":"#/definitions/VideoPreviewTranscode"}'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  videoFormat?: string(name='video_format', description='video_format', example='"H264"'),
  width?: long(name='width', description='width', example=720, format='int64'),
}

/**
 * 
 */
model VideoPreviewSprite {
  col?: long(name='col', description='col', example=10, format='int64'),
  count?: long(name='count', description='count', example=4, format='int64'),
  frameCount?: long(name='frame_count', description='frame_count', example=333, format='int64'),
  frameHeight?: long(name='frame_height', description='frame_height', example=90, format='int64'),
  frameWidth?: long(name='frame_width', description='frame_width', example=160, format='int64'),
  row?: long(name='row', description='row', example=10, format='int64'),
  status?: string(name='status', description='status', example='finished'),
}

/**
 * 
 */
model VideoPreviewTranscode {
  status?: string(name='status', description='status', example='finished'),
  templateId?: string(name='template_id', description='template_id', example='"Original"'),
}

model AdminListStoresRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AdminListStoresRequest(description='body', name='body'),
}

model AdminListStoresModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListStoresResponse(description='body', name='body'),
}

/**
 * 列举Store列表
 * @tags admin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api adminListStores(request: AdminListStoresRequestModel, runtime: RuntimeOptions): AdminListStoresModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/domain/list_stores`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUserAccessTokenRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetUserAccessTokenRequest(description='body', name='body'),
}

model GetUserAccessTokenModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: AccessTokenResponse(description='body', name='body'),
}

/**
 * 获取用户的accessToken
 * @tags admin
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 */
api getUserAccessToken(request: GetUserAccessTokenRequestModel, runtime: RuntimeOptions): GetUserAccessTokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/get_access_token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * 
 */
model AddStoreResponse {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速域名', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='ccp-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  customizedEndpoint?: string(name='customized_endpoint', description='用户自定义绑定存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  endpoint: string(name='endpoint', description='存储访问地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='内网存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='cdjaksbwuiqbxuiassd'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model AdminListStoresRequest {
}

/**
 * 
 */
model AppAccessStrategy {
  effect?: string(name='effect'),
  exceptAppIdList?: [ string ](name='except_app_id_list', items='{"type":"string"}'),
}

/**
 * 
 */
model AuthConfig {
  appId?: string(name='app_id'),
  appSecret?: string(name='app_secret'),
  callbackSecurity?: boolean(name='callback_security'),
  enable?: boolean(name='enable'),
  endpoint?: string(name='endpoint'),
  enterpriseId?: string(name='enterprise_id'),
}

/**
 * base domain response
 */
model BaseDomainResponse {
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: long(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='是否开启了分享', example=true),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
}

/**
 * create domain response
 */
model CreateDomainResponse {
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: long(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='是否开启了分享', example=true),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
}

/**
 * 
 */
model GetAppPublicKeyResponse {
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
}

/**
 * 
 */
model GetAppResponse {
  aliOwnerId: string(name='ali_owner_id', description='App 拥有者', example='172***430'),
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  appName: string(name='app_name', description='App名称', example='图片分享应用', maxLength=128, minLength=1, pattern='[0-9a-zA-Z]+'),
  appSecret: string(name='app_secret', description='App 秘钥', example='sax***Js9'),
  createdAt: string(name='created_at', description='App 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  description: string(name='description', description='App描述', example='测试专用', maxLength=128, minLength=0),
  logo: string(name='logo', description='App图标', example='https://app.com/logo.jpg'),
  provider: string(name='provider', description='App 提供方', example='Alibaba Inc.'),
  redirectUri: string(name='redirect_uri', description='App回调地址', example='https://app.com/callback'),
  scope: [ string ](name='scope', description='App权限列表', enum='FILE.ALL, SHARE.ALL, STORAGEFILE.ALL, STORAGE.ALL, DRIVE.ALL, USER.ALL', items='{"type":"string"}'),
  screenshots: [ string ](name='screenshots', description='App 屏幕截图', example='http://app.com/screenshot_1.jpg', items='{"type":"string"}'),
  stage: string(name='stage', default='UnPublished,Pending,Published', description='App 当前阶段', example='UnPublished'),
  type: string(name='type', default='WebServer', description='App类型', enum='WebServer, WebBrowser, Native', example='WebServer'),
  updatedAt: string(name='updated_at', description='App 修改时间', example='"2019-08-31T12:58:31.137Z"'),
}

/**
 * get domain response
 */
model GetDomainResponse {
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: long(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='是否开启了分享', example=true),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
}

/**
 * 
 */
model GetUserAccessTokenRequest {
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * 
 */
model ListAppsResponse {
  items: [ GetAppResponse ](name='items', description='App 列表', example='', items='{"$ref":"#/definitions/GetAppResponse"}'),
  nextMarker?: string(name='next_marker', description='App 分批查询游标', example='ncsajnsalsa='),
}

/**
 * list domain cors response
 */
model ListDomainCORSRuleResponse {
  corsRuleList?: [ CorsRule ](name='cors_rule_list', description='cors rule 列表', items='{"$ref":"#/definitions/CorsRule"}'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
}

/**
 * list domain response
 */
model ListDomainsResponse {
  items?: [ BaseDomainResponse ](name='items', description='domain 列表', example='', items='{"$ref":"#/definitions/BaseDomainResponse"}'),
  nextMarker?: string(name='next_marker', description='下次分页查询游标', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 
 */
model ListStoresResponse {
  items: [ Store ](name='items', description='Store 列表', example='', items='{"$ref":"#/definitions/Store"}'),
}

/**
 * 
 */
model Store {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速域名', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='ccp-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  customizedEndpoint?: string(name='customized_endpoint', description='用户自定义绑定存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  endpoint: string(name='endpoint', description='存储访问地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='内网存储地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='cdjaksbwuiqbxuiassd'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * create domain response
 */
model UpdateDomainResponse {
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: long(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='是否开启了分享', example=true),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
}

model GetAsyncTaskInfoRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetAsyncTaskRequest(description='body', name='body'),
}

model GetAsyncTaskInfoModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetAsyncTaskResponse(description='body', name='body'),
}

/**
 * 如果目录拷贝、目录删除不能在限定时间内完成，将访问一个异步任务id，
 * 通过此接口获取异步任务的信息，以确定任务是否执行成功。
 * @tags async_task
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getAsyncTaskInfo(request: GetAsyncTaskInfoRequestModel, runtime: RuntimeOptions): GetAsyncTaskInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/async_task/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model BatchOperationRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPBatchRequest(description='body', name='body'),
}

model BatchOperationModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPBatchResponse(description='body', name='body'),
}

/**
 * 对多个原子操作封装成一个批处理请求，服务端并行处理并打包返回每个操作的执行结果。
 * 支持对文件和文件夹的移动、删除、修改，每个批处理请求最多包含100个原则操作。
 * @tags batch
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api batchOperation(request: BatchOperationRequestModel, runtime: RuntimeOptions): BatchOperationModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/batch`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateDriveRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateDriveRequest(description='body', name='body'),
}

model CreateDriveModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateDriveResponse(description='body', name='body'),
}

/**
 * 支持normal和large两种drive，
 * large类型的drive用于文件数多的场景，不支持list操作，
 * 当drive的文件数量大于1亿时，建议使用large类型。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createDrive(request: CreateDriveRequestModel, runtime: RuntimeOptions): CreateDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteDriveRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: DeleteDriveRequest(description='body', name='body'),
}

model DeleteDriveModel {
  headers?: map[string]string(description='headers', name='headers'),
}

/**
 * 删除指定drive_id对应的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteDrive(request: DeleteDriveRequestModel, runtime: RuntimeOptions): DeleteDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDriveRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetDriveRequest(description='body', name='body'),
}

model GetDriveModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetDriveResponse(description='body', name='body'),
}

/**
 * 获取指定drive_id对应的Drive详细信息。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDrive(request: GetDriveRequestModel, runtime: RuntimeOptions): GetDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDefaultDriveRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetDefaultDriveRequest(description='body', name='body'),
}

model GetDefaultDriveModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetDriveResponse(description='body', name='body'),
}

/**
 * 一个用户可拥有多个drive，在创建drive时通过参数指定是否为这个用户的默认drive，
 * 每个用户只能设置一个默认drive。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDefaultDrive(request: GetDefaultDriveRequestModel, runtime: RuntimeOptions): GetDefaultDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/get_default_drive`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListDrivesRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListDriveRequest(description='body', name='body'),
}

model ListDrivesModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListDriveResponse(description='body', name='body'),
}

/**
 * 管理员列举指定用户的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listDrives(request: ListDrivesRequestModel, runtime: RuntimeOptions): ListDrivesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListMyDrivesRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListMyDriveRequest(description='body', name='body'),
}

model ListMyDrivesModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListDriveResponse(description='body', name='body'),
}

/**
 * 列举当前用户（访问令牌）的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listMyDrives(request: ListMyDrivesRequestModel, runtime: RuntimeOptions): ListMyDrivesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/list_my_drives`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateDriveRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateDriveRequest(description='body', name='body'),
}

model UpdateDriveModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateDriveResponse(description='body', name='body'),
}

/**
 * 更新指定drive_id的Drive信息
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateDrive(request: UpdateDriveRequestModel, runtime: RuntimeOptions): UpdateDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CompleteFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCompleteFileRequest(description='body', name='body'),
}

model CompleteFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCompleteFileResponse(description='body', name='body'),
}

/**
 * 完成文件上传。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api completeFile(request: CompleteFileRequestModel, runtime: RuntimeOptions): CompleteFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/complete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CopyFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCopyFileRequest(description='body', name='body'),
}

model CopyFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCopyFileResponse(description='body', name='body'),
}

/**
 * 指定源文件或文件夹，拷贝到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api copyFile(request: CopyFileRequestModel, runtime: RuntimeOptions): CopyFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/copy`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCreateFileRequest(description='body', name='body'),
}

model CreateFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPCreateFileResponse(description='body', name='body'),
}

/**
 * 在指定文件夹下创建文件或者文件夹，
 * 根文件夹用root表示，其他文件夹使用创建文件夹时返回的file_id。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createFile(request: CreateFileRequestModel, runtime: RuntimeOptions): CreateFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPDeleteFileRequest(description='body', name='body'),
}

model DeleteFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPDeleteFileResponse(description='body', name='body'),
}

/**
 * 指定文件或文件夹ID，删除文件或者文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteFile(request: DeleteFileRequestModel, runtime: RuntimeOptions): DeleteFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DownloadFileQuery {
  DriveID: string(name='DriveID', description='drive id', example='1'),
  FileID: string(name='FileID', description='file id', example='5d79206586bb5dd69fb34c349282718146c55da7'),
  ImageThumbnailProcess?: string(name='ImageThumbnailProcess', description='image_thumbnail_process', example='image/resize,m_fill,h_128,w_128,limit_0'),
  VideoThumbnailProcess?: string(name='VideoThumbnailProcess', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

model DownloadFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  query: DownloadFileQuery(description='query', name='query'),
}

model DownloadFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetDownloadUrlRequest(description='body', name='body'),
}

/**
 * 指定文件ID，下载文件。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api downloadFile(request: DownloadFileRequestModel, runtime: RuntimeOptions): DownloadFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'GET';
  __request.pathname = getPathname(@nickname, `/v2/file/download`);
  __request.query = Util.stringifyMapValue(request.query);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetFileRequest(description='body', name='body'),
}

model GetFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetFileResponse(description='body', name='body'),
}

/**
 * 获取指定文件或文件夹ID的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getFile(request: GetFileRequestModel, runtime: RuntimeOptions): GetFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetFileByPathRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetFileByPathRequest(description='body', name='body'),
}

model GetFileByPathModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetFileByPathResponse(description='body', name='body'),
}

/**
 * 根据路径获取指定文件或文件夹的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getFileByPath(request: GetFileByPathRequestModel, runtime: RuntimeOptions): GetFileByPathModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_by_path`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDownloadUrlRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetDownloadUrlRequest(description='body', name='body'),
}

model GetDownloadUrlModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetDownloadUrlResponse(description='body', name='body'),
}

/**
 * 获取文件的下载地址，调用者可自己设置range头并发下载。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDownloadUrl(request: GetDownloadUrlRequestModel, runtime: RuntimeOptions): GetDownloadUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_download_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLastCursorRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetLastCursorRequest(description='body', name='body'),
}

model GetLastCursorModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetLastCursorResponse(description='body', name='body'),
}

/**
 * 获取drive内，增量数据最新的游标
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getLastCursor(request: GetLastCursorRequestModel, runtime: RuntimeOptions): GetLastCursorModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_last_cursor`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUploadUrlRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetUploadUrlRequest(description='body', name='body'),
}

model GetUploadUrlModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetUploadUrlResponse(description='body', name='body'),
}

/**
 * 可指定分片信息，一次获取多个分片的上传地址。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getUploadUrl(request: GetUploadUrlRequestModel, runtime: RuntimeOptions): GetUploadUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_upload_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetVideoPreviewSpriteUrlRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetVideoPreviewSpriteURLRequest(description='body', name='body'),
}

model GetVideoPreviewSpriteUrlModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetVideoPreviewSpriteURLResponse(description='body', name='body'),
}

/**
 * 获取视频雪碧图地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getVideoPreviewSpriteUrl(request: GetVideoPreviewSpriteUrlRequestModel, runtime: RuntimeOptions): GetVideoPreviewSpriteUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_video_preview_sprite_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetVideoPreviewUrlRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetVideoPreviewURLRequest(description='body', name='body'),
}

model GetVideoPreviewUrlModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPGetVideoPreviewURLResponse(description='body', name='body'),
}

/**
 * 获取视频播放地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getVideoPreviewUrl(request: GetVideoPreviewUrlRequestModel, runtime: RuntimeOptions): GetVideoPreviewUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_video_preview_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListFileRequest(description='body', name='body'),
}

model ListFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListFileResponse(description='body', name='body'),
}

/**
 * 列举指定目录下的文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFile(request: ListFileRequestModel, runtime: RuntimeOptions): ListFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileByCustomIndexKeyRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListFileByCustomIndexKeyRequest(description='body', name='body'),
}

model ListFileByCustomIndexKeyModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListFileResponse(description='body', name='body'),
}

/**
 * 根据自定义同步索引键列举文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileByCustomIndexKey(request: ListFileByCustomIndexKeyRequestModel, runtime: RuntimeOptions): ListFileByCustomIndexKeyModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_by_custom_index_key`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileDeltaRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListFileDeltaRequest(description='body', name='body'),
}

model ListFileDeltaModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListFileDeltaResponse(description='body', name='body'),
}

/**
 * 获取drive内，增量数据列表
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileDelta(request: ListFileDeltaRequestModel, runtime: RuntimeOptions): ListFileDeltaModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_delta`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListUploadedPartsRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListUploadedPartRequest(description='body', name='body'),
}

model ListUploadedPartsModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPListUploadedPartResponse(description='body', name='body'),
}

/**
 * 列举upload_id对应的已上传分片。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listUploadedParts(request: ListUploadedPartsRequestModel, runtime: RuntimeOptions): ListUploadedPartsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_uploaded_parts`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model MoveFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPMoveFileRequest(description='body', name='body'),
}

model MoveFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPMoveFileResponse(description='body', name='body'),
}

/**
 * 指定源文件或文件夹，移动到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api moveFile(request: MoveFileRequestModel, runtime: RuntimeOptions): MoveFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/move`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ScanFileMetaRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPScanFileMetaRequest(description='body', name='body'),
}

model ScanFileMetaModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPScanFileMetaResponse(description='body', name='body'),
}

/**
 * 在指定drive下全量获取文件元信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api scanFileMeta(request: ScanFileMetaRequestModel, runtime: RuntimeOptions): ScanFileMetaModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/scan`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPSearchFileRequest(description='body', name='body'),
}

model SearchFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPSearchFileResponse(description='body', name='body'),
}

/**
 * 根据筛选条件，在指定drive下搜索文件。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchFile(request: SearchFileRequestModel, runtime: RuntimeOptions): SearchFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateFileRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPUpdateFileMetaRequest(description='body', name='body'),
}

model UpdateFileModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CCPUpdateFileMetaResponse(description='body', name='body'),
}

/**
 * 对指定的文件或文件夹更新信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateFile(request: UpdateFileRequestModel, runtime: RuntimeOptions): UpdateFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * complete file request
 */
model BaseCompleteFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id'),
}

/**
 * create file request
 */
model BaseCreateFileRequest {
  contentMd5: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType: string(name='content_type', description='ContentType', example='application/json'),
  name: string(name='name', description='Name', example='ccp.jpg', maximum=1024, minimum=1),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  size: long(name='size', description='Size', format='int64', maximum=53687091200, minimum=0),
  type: string(name='type', description='Type', enum='file, folder', example='file'),
}

/**
 * 获取文件上传URL
 */
model BaseGetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
}

/**
 * list file request
 */
model BaseListFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: long(name='limit', default=50, description='limit', example=10, format='int64', maximum=100, minimum=0, pattern='[0-9]{1,3}'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 文件移动请求
 */
model BaseMoveFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maximum=1024, minimum=1),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean', example=false),
}

/**
 * 
 */
model BatchSubRequest {
  body?: object(name='body', additionalProperties='{"type":"object"}', description='body 子请求的请求参数 json 字符串，可参考对于子请求文档, 当指定了body 必须传headers ： "Content-Type" 对应的类型，目前子请求入参是"application/json"', example='{"drive_id":"101","file_id":"xxxxxx"}'),
  headers?: object(name='headers', additionalProperties='{"type":"string"}', description='headers 请求头，表示body传入数据的类型', example='{"Content-Type":"application/json"}'),
  id: string(name='id', description='id 用于request 和 response关联， 不允许重复', example='"1"'),
  method: string(name='method', description='method', enum='POST, GET, PUT, DELETE, HEAD', example='"POST"'),
  url: string(name='url', description='url 子请求的api path路径， 可参考对于子请求文档', example='/file/get'),
}

/**
 * 批处理
 */
model CCPBatchRequest {
  requests: [ BatchSubRequest ](name='requests', description='Requests 请求合集', items='{"$ref":"#/definitions/BatchSubRequest"}'),
  resource: string(name='resource', description='支持的资源类型', example='"file"'),
}

/**
 * 合并文件上传任务
 */
model CCPCompleteFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 文件拷贝
 */
model CCPCopyFileRequest {
  autoRename?: boolean(name='auto_rename', default=false, description='auto_rename
type: boolean', example=false),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maximum=1024, minimum=1),
  toDriveId?: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFileId: string(name='to_parent_file_id', description='to_parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
}

/**
 * 创建文件
 */
model CCPCreateFileRequest {
  contentMd5?: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType?: string(name='content_type', description='ContentType', example='application/json'),
  name?: string(name='name', description='Name', example='ccp.jpg', maximum=1024, minimum=1),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  size?: long(name='size', description='Size', format='int64', maximum=53687091200, minimum=0),
  type?: string(name='type', description='Type', enum='file, folder', example='file'),
  autoRename?: boolean(name='auto_rename'),
  checkNameMode?: string(name='check_name_mode', default='ignore', description='check_name_mode', enum='ignore, auto_rename, refuse'),
  contentHash?: string(name='content_hash', description='content_hash', example='7C4A8D09CA3762AF61E59520943DC26494F8941B'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  description?: string(name='description', description='description', example='file description', maxLength=0, minLength=1024),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode'),
  fileId?: string(name='file_id', description='file_id'),
  hidden?: boolean(name='hidden', description='hidden', enum='true, false', example=false),
  imageMediaMetadata?: ImageMediaMetadata(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1, label2', items='{"type":"string"}'),
  lastUpdatedAt?: string(name='last_updated_at', description='last_updated_at', example='2019-08-20T06:51:27.292Z'),
  meta?: string(name='meta'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  preHash?: string(name='pre_hash', description='pre_hash', example='E10ADC3949BA59ABBE56E057F20F883E'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/StreamInfo"}', description='streams_info'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaMetadata(name='video_media_metadata'),
}

/**
 * 删除文件请求
 */
model CCPDeleteFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d792010669a1dd91087479e8071c9ae212065cc', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  permanently?: boolean(name='permanently', default=false, description='permanently
type: false', example=false),
}

/**
 * 批量删除文件请求
 */
model CCPDeleteFilesRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileIdList: [ string ](name='file_id_list', description='file_id_list', example='', items='{"type":"string"}', maxItems=100),
}

/**
 * 获取异步人去信息
 */
model CCPGetAsyncTaskRequest {
  asyncTaskId?: string(name='async_task_id', description='async_task_id
type:string', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
}

/**
 * 获取文件下载地址的请求body
 */
model CCPGetDownloadUrlRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=0),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileName?: string(name='file_name', description='file_name', example='ccp.jpg', maxLength=1024, minLength=1),
}

/**
 * 根据路径获取 File 接口 body
 */
model CCPGetFileByPathRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', default='*', description='fields', example='*'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_thumbnail_process
type:string', example='image/crop,w_100,h_100/rounded-corners,r_10/format,png'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取文件元数据
 */
model CCPGetFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', default='*', description='fields', example='*'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_thumbnail_process
type:string', example='image/crop,w_100,h_100/rounded-corners,r_10/format,png'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取文件上传URL
 */
model CCPGetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 获取视频雪碧图地址的请求body
 */
model CCPGetVideoPreviewSpriteURLRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=0),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
}

/**
 * 获取视频文件播放地址的请求body
 */
model CCPGetVideoPreviewURLRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=0),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  templateId?: string(name='template_id', description='template_id', example='SD'),
}

/**
 * 列举文件
 */
model CCPListFileByCustomIndexKeyRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: long(name='limit', default=50, description='limit', example=10, format='int64', maximum=100, minimum=0, pattern='[0-9]{1,3}'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
  Starred?: boolean(name='Starred', description='starred', enum='false, true', example=false),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  customIndexKey?: string(name='custom_index_key', description='custom_index_key'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode'),
  fields?: string(name='fields', description='fields', example='*'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
}

/**
 * 列举文件
 */
model CCPListFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: long(name='limit', default=50, description='limit', example=10, format='int64', maximum=100, minimum=0, pattern='[0-9]{1,3}'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
  Starred?: boolean(name='Starred', description='starred', enum='false, true', example=false),
  all?: boolean(name='all', default=true, description='all', enum='false, true', example=false),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  fields?: string(name='fields', description='fields', example='*'),
  orderBy?: string(name='order_by', description='order_by', enum='update_time, name', example='name'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  parentFileId?: string(name='parent_file_id', description='ParentFileID', example='root', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
}

/**
 * 列举uploadID对应的已上传分片
 */
model CCPListUploadedPartRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  limit: long(name='limit', default=1000, description='limit', example=1, format='int64', maximum=1000, minimum=1, pattern='[0-9]+'),
  partNumberMarker?: long(name='part_number_marker', description='part_number_marker', example=1, format='int64', minimum=1, pattern='[0-9]+'),
  uploadId?: string(name='upload_id', description='upload_id', example='00668396C0814D818D90F0A92B04B355'),
}

/**
 * 文件移动请求
 */
model CCPMoveFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maximum=1024, minimum=1),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  toParentFileId?: string(name='to_parent_file_id', description='to_parent_file_id', example='root', maxLength=50, minLength=40),
}

/**
 * 全量获取file元信息的请求body
 */
model CCPScanFileMetaRequest {
  category?: string(name='category', description='category', example='image'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  limit?: integer(name='limit', description='limit', example=1000, format='int32', maximum=5000, minimum=1),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
}

/**
 * 搜索文件元数据
 */
model CCPSearchFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,m_fill,h_128,w_128,limit_0'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,m_fill,h_128,w_128,limit_0'),
  limit?: integer(name='limit', default=50, description='limit', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='Marker', example='""'),
  orderBy?: string(name='order_by', default='updated_at', description='order_by', enum='name, created_at, updated_at, size', example='size'),
  query?: string(name='query', description='query', example='not name=123', maxLength=4096),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 更新文件元数据
 */
model CCPUpdateFileMetaRequest {
  customIndexKey?: string(name='custom_index_key'),
  description?: string(name='description', description='description
type: string', example='description', maxLength=1024),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  hidden?: boolean(name='hidden', default=false, description='hidden
type: boolean', example=false),
  labels?: [ string ](name='labels', description='labels', example='label1, label2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', maxLength=1024, minLength=1),
  starred?: boolean(name='starred', default=false, description='starred
type: boolean', example=false),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
}

/**
 * complete file request
 */
model CompleteFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  filePath?: string(name='file_path'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId: string(name='upload_id', description='upload_id'),
}

/**
 * copy file request
 */
model CopyFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  filePath?: string(name='file_path'),
  newName: string(name='new_name', description='new_name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean'),
  shareId?: string(name='share_id'),
  toDriveId: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFileId: string(name='to_parent_file_id', description='to_parent_file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  toParentFilePath?: string(name='to_parent_file_path'),
  toShareId?: string(name='to_share_id'),
}

/**
 * create drive request
 */
model CreateDriveRequest {
  default?: boolean(name='default', default=false, description='是否默认drive, 只允许设置一个默认drive', example=true),
  description?: string(name='description', description='描述信息', example='ccp team drive', maximum=1024),
  driveName: string(name='drive_name', description='Drive 名称', example='ccpdrive', maximum=1024),
  driveType?: string(name='drive_type', default='normal', description='Drive类型', enum='normal, large', example='normal'),
  encryptMode?: string(name='encrypt_mode'),
  owner: string(name='owner', description='所属者', example='ccp-001'),
  relativePath?: string(name='relative_path', description='domain的PathType为OSSPath时必选。 Drive存储基于store的相对路径', example='/d/e/f/'),
  status?: string(name='status', default='enabled', description='状态', enum='disabled, enabled', example='enabled'),
  storeId?: string(name='store_id', description='StoreID , domain的PathType为OSSPath时必选', example='store_id'),
  totalSize?: long(name='total_size', default=-1, description='总大小,单位Byte [如果设置 -1 代表不限制]', example=1024, format='int64'),
}

/**
 * create file request
 */
model CreateFileRequest {
  contentHash?: string(name='content_hash', description='ContentHash'),
  contentHashName?: string(name='content_hash_name', description='ContentHashName', enum='sha1', example='sha1'),
  contentMd5?: string(name='content_md5', description='ContentMd5', maxLength=32),
  contentType: string(name='content_type', description='ContentType'),
  description?: string(name='description', description='Description', maxLength=0, minLength=1024),
  driveId: string(name='drive_id', description='DriveID', example='1', pattern='[0-9]+'),
  hidden?: boolean(name='hidden', description='Hidden', enum='true, false'),
  meta?: string(name='meta', description='Meta'),
  name: string(name='name', description='name', example='ccp.jpg'),
  parentFileId: string(name='parent_file_id', description='parent_file_id', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  parentFilePath?: string(name='parent_file_path', description='ParentFilePath'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  preHash?: string(name='pre_hash', description='pre_hash'),
  shareId?: string(name='share_id', description='ShareID'),
  size: long(name='size', description='Size', format='int64', maximum=53687091200, minimum=0),
  tags?: object(name='tags', additionalProperties='{"type":"object"}', description='tags'),
  type: string(name='type', description='Type', enum='file, folder'),
}

/**
 * create share request
 */
model CreateShareRequest {
  description?: string(name='description', description='description', example='share description'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  owner: string(name='owner', description='creator', example='abc'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFilePath: string(name='share_file_path', description='share_file_path'),
  shareName?: string(name='share_name', description='share_name', example='share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', description='share create policy

share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', enum='enabled, disabled', example='enabled'),
}

/**
 * Delete drive request
 */
model DeleteDriveRequest {
  driveId: string(name='drive_id', description='Drive ID', example='123'),
}

/**
 * 删除文件请求
 */
model DeleteFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  filePath?: string(name='file_path'),
  permanently?: boolean(name='permanently'),
  shareId?: string(name='share_id'),
}

/**
 * delete share request
 */
model DeleteShareRequest {
  shareId: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 下载文件请求body
 */
model DownloadRequest {
  DriveID: string(name='DriveID', description='drive_id', example='1', pattern='[0-9]+'),
  FileID: string(name='FileID', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  ImageProcess?: string(name='ImageProcess', description='image_process', example='image/resize,w_200'),
  ShareID?: string(name='ShareID'),
}

/**
 * 获取异步人去信息
 */
model GetAsyncTaskRequest {
  asyncTaskId?: string(name='async_task_id', description='async_task_id
type:string', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
}

/**
 * Get default drive request
 */
model GetDefaultDriveRequest {
  userId?: string(name='user_id', description='用户ID', example='abc'),
}

/**
 * 获取文件下载地址的请求body
 */
model GetDownloadUrlRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=0),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileName?: string(name='file_name', description='file_name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  filePath?: string(name='file_path'),
  shareId?: string(name='share_id'),
}

/**
 * Get drive request
 */
model GetDriveRequest {
  driveId: string(name='drive_id', description='Drive ID', example='123'),
}

/**
 * 获取文件元数据
 */
model GetFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  filePath?: string(name='file_path'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  shareId?: string(name='share_id'),
}

/**
 * 获取最新游标
 */
model GetLastCursorRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * get share request
 */
model GetShareRequest {
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 获取文件上传URL
 */
model GetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', maxLength=32),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  filePath?: string(name='file_path'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId: string(name='upload_id', description='upload_id'),
}

/**
 * 
 */
model ImageMediaMetadata {
  height?: long(name='height', description='height', example=2448, format='int64'),
  width?: long(name='width', description='width：', example=3264, format='int64'),
}

/**
 * List drive request
 */
model ListDriveRequest {
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记, 接口返回的标记值', example='marker'),
  owner?: string(name='owner', description='所属者', example='abc'),
}

/**
 * 获取增量文件操作记录
 */
model ListFileDeltaRequest {
  cursor?: string(name='cursor', description='cursor 游标', example='abc'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  limit?: integer(name='limit', description='limit
default 100', example=100, format='int32'),
}

/**
 * list file request
 */
model ListFileRequest {
  all?: boolean(name='all', description='all', enum='false,  true'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process'),
  limit?: long(name='limit', default=50, description='limit', format='int64', maximum=100, minimum=0, pattern='[0-9]{1,3}'),
  marker?: string(name='marker', description='marker'),
  parentFileId: string(name='parent_file_id', description='ParentFileID', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  parentFilePath?: string(name='parent_file_path'),
  shareId?: string(name='share_id'),
  status?: string(name='status', description='status', enum='uploading,  available'),
}

/**
 * List my drive request
 */
model ListMyDriveRequest {
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记, 接口返回的标记值', example='marker'),
}

/**
 * list share request
 */
model ListShareRequest {
  creator?: string(name='creator', description='creator', example='tom'),
  driveId?: string(name='drive_id', example='1', pattern='[0-9]+'),
  limit: integer(name='limit', description='limit', example=50, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='marker'),
  owner?: string(name='owner', description='Owner', example='jack'),
  shareFilePath?: string(name='share_file_path', description='share_file_path', example='/a/b/'),
}

/**
 * list store file
 */
model ListStoreFileRequest {
  limit?: long(name='limit', default=100, description='limit', example=50, format='int64', maximum=1000, minimum=1),
  marker?: string(name='marker', description='marker'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_path'),
  storeId?: string(name='store_id', description='store_id', example='xxx'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
}

/**
 * list storage file
 */
model ListStoreRequest {
  domainId?: string(name='domain_id', description='domain_id', example='10'),
}

/**
 * complete file request
 */
model OSSCompleteFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id'),
  filePath?: string(name='file_path'),
  shareId?: string(name='share_id'),
}

/**
 * copy file request
 */
model OSSCopyFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  toDriveId: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFilePath: string(name='to_parent_file_path', description='to_parent_file_path', example='/a/b/c/'),
  toShareId?: string(name='to_share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * create file request
 */
model OSSCreateFileRequest {
  contentMd5?: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType?: string(name='content_type', description='ContentType', example='application/json'),
  name?: string(name='name', description='Name', example='ccp.jpg', maximum=1024, minimum=1),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  size?: long(name='size', description='Size', format='int64', maximum=53687091200, minimum=0),
  type?: string(name='type', description='Type', enum='file, folder', example='file'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_path'),
  shareId?: string(name='share_id', description='share_id', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 删除文件请求
 */
model OSSDeleteFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', maxLength=1000, minLength=1),
  permanently?: boolean(name='permanently', description='permanently
type: false', example=false),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 获取文件下载地址的请求body
 */
model OSSGetDownloadUrlRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=10),
  fileName?: string(name='file_name', description='file_name', example='ccp.jpg'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg', maxLength=1000, minLength=1),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 获取文件元数据
 */
model OSSGetFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_id', maxLength=1000, minLength=1),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
}

/**
 * 获取文件安全地址的请求body
 */
model OSSGetSecureUrlRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=60, description='expire_sec 单位秒', example=60, format='int64'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg', maxLength=1000, minLength=1),
  secureIp?: string(name='secure_ip', description='secure_ip', example='192.168.1.1/24'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 获取文件上传URL
 */
model OSSGetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9a-zA-Z-]+'),
}

/**
 * list file request
 */
model OSSListFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: long(name='limit', default=50, description='limit', example=10, format='int64', maximum=100, minimum=0, pattern='[0-9]{1,3}'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  parentFilePath: string(name='parent_file_path', description='ParentFilePath', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9a-zA-Z-]+'),
  urlExpireSec?: long(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 列举uploadID对应的已上传分片
 */
model OSSListUploadedPartRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  limit: long(name='limit', default=1000, description='limit', example=1, format='int64', maximum=1000, minimum=1, pattern='[0-9]+'),
  partNumberMarker?: long(name='part_number_marker', description='part_number_marker', example=1, format='int64', minimum=1, pattern='[0-9]+'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  uploadId?: string(name='upload_id', description='upload_id', example='00668396C0814D818D90F0A92B04B355'),
}

/**
 * 文件移动请求
 */
model OSSMoveFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  newName: string(name='new_name', description='new_name', example='ccp.jpg'),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  toParentFilePath?: string(name='to_parent_file_path', description='file_path', example='/a/b/c/'),
}

/**
 * 获取视频DRM License
 */
model OSSVideoDRMLicenseRequest {
  drmType: string(name='drmType', description='drmType', example='widevine,fairplay'),
  licenseRequest: string(name='licenseRequest', description='licenseRequest', example='xxx'),
}

/**
 * 获取视频分辨率列表
 */
model OSSVideoDefinitionRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 获取视频的m3u8文件
 */
model OSSVideoM3U8Request {
  definition?: string(name='definition', default='Original', description='definition', example='Original'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: long(name='expire_sec', default=60, description='expire_sec', example=60, format='int64', maximum=86400, minimum=60),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  signToken: string(name='sign_token', description='sign_token', example='a8swq28ue21has22das213eds'),
}

/**
 * 启动视频转码请求
 */
model OSSVideoTranscodeRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  hlsTime?: long(name='hls_time', description='hls_time', example=10, format='int64'),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  remarks?: string(name='remarks', description='remarks', example='{"userID":"xxx"}'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  transcode?: boolean(name='transcode', default=false, description='transcode', example=true),
}

/**
 * UCGetObjectInfoByObjectKeyRequest
 */
model UCGetObjectInfoByObjectKeyRequest {
  objectKey?: string(name='object_key'),
}

/**
 * UCGetObjectInfoBySha1Request
 */
model UCGetObjectInfoBySha1Request {
  sha1?: string(name='sha1'),
}

/**
 * Update drive request
 */
model UpdateDriveRequest {
  description?: string(name='description', description='描述信息', example='ccp team drive', maximum=1024),
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive', maximum=1024),
  encryptDataAccess?: boolean(name='encrypt_data_access', default=false, description='授权访问加密数据', example=true),
  encryptMode?: string(name='encrypt_mode', description='加密模式', example='server'),
  status?: string(name='status', default='enabled', description='状态', enum='disabled, enabled', example='enabled'),
  totalSize?: long(name='total_size', default=0, description='总大小,单位Byte [如果设置 -1 代表不限制]', example=1024, format='int64'),
}

/**
 * 更新文件元数据
 */
model UpdateFileMetaRequest {
  description?: string(name='description', description='description
type: string', maxLength=1000),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  hidden?: boolean(name='hidden', default=false, description='hidden
type: boolean'),
  meta?: string(name='meta', description='meta'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  shareId?: string(name='share_id'),
  starred?: boolean(name='starred', default=false, description='starred
type: boolean'),
  tags?: object(name='tags', additionalProperties='{"type":"object"}', description='tags'),
}

/**
 * update share request
 */
model UpdateShareRequest {
  description?: string(name='description', description='description', example='share description', maxLength=1024),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareId: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share_name'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', description='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', enum='enabled, disabled', example='enabled'),
}

/**
 * 
 */
model VideoMediaMetadata {
  duration?: string(name='duration', description='Duration', example='"10.111"'),
}

model CreateUserRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateUserRequest(description='body', name='body'),
}

model CreateUserModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateUserResponse(description='body', name='body'),
}

/**
 * 创建用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createUser(request: CreateUserRequestModel, runtime: RuntimeOptions): CreateUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteUserRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: DeleteUserRequest(description='body', name='body'),
}

model DeleteUserModel {
  headers?: map[string]string(description='headers', name='headers'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteUser(request: DeleteUserRequestModel, runtime: RuntimeOptions): DeleteUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUserRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetUserRequest(description='body', name='body'),
}

model GetUserModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetUserResponse(description='body', name='body'),
}

/**
 * 获取用户详细信息，普通用户只能获取自己的信息，管理员可以获取任意用户的信息。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getUser(request: GetUserRequestModel, runtime: RuntimeOptions): GetUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListUsersRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListUserRequest(description='body', name='body'),
}

model ListUsersModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListUserResponse(description='body', name='body'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listUsers(request: ListUsersRequestModel, runtime: RuntimeOptions): ListUsersModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchUserRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: SearchUserRequest(description='body', name='body'),
}

model SearchUserModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListUserResponse(description='body', name='body'),
}

/**
 * 该接口将会根据条件查询用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchUser(request: SearchUserRequestModel, runtime: RuntimeOptions): SearchUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateUserRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateUserRequest(description='body', name='body'),
}

model UpdateUserModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateUserResponse(description='body', name='body'),
}

/**
 * 用户可以修改自己的description，nick_name，avatar；
 * 管理员在用户基础上还可修改status（可以修改任意用户）；
 * 超级管理员在管理员基础上还可修改role（可以修改任意用户）。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateUser(request: UpdateUserRequestModel, runtime: RuntimeOptions): UpdateUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * 
 */
model BaseMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  district?: string(name='district', description='district', example='余杭区'),
  height?: long(name='height', default=0, description='height', example=720, format='int64'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  width?: long(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * Base user response
 */
model BaseUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: long(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: long(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * Create user request
 */
model CreateUserRequest {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  description?: string(name='description', description='描述信息', example='ccp team user', maximum=1024),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='ccpuser'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='abc'),
}

/**
 * Create user response
 */
model CreateUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: long(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: long(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * Delete user request
 */
model DeleteUserRequest {
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * Delete user response
 */
model DeleteUserResponse {
}

/**
 * Get user request
 */
model GetUserRequest {
  userId?: string(name='user_id', description='用户 ID, 使用ak方式访问，该项必传, access_token访问如果不传，默认取自己的user信息
example'),
}

/**
 * Get user response
 */
model GetUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: long(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: long(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * List user request
 */
model ListUserRequest {
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
}

/**
 * List user response
 */
model ListUserResponse {
  items?: [ BaseUserResponse ](name='items', items='{"$ref":"#/definitions/BaseUserResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='nextmarker'),
}

/**
 * Search user request
 */
model SearchUserRequest {
  email?: string(name='email', description='邮箱', example='abc@ccp.com'),
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
  nickName?: string(name='nick_name', description='昵称', example='la'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  userName?: string(name='user_name', description='用户名', example='abc'),
}

/**
 * Update user request
 */
model UpdateUserRequest {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  description?: string(name='description', description='描述信息', example='ccp team user', maximum=1024),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='ccpuser'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * Update user response
 */
model UpdateUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: long(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: long(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

model CreateStoryRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateStoryRequest(description='body', name='body'),
}

model CreateStoryModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: CreateStoryResponse(description='body', name='body'),
}

/**
 * 该接口将会获取故事列表
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createStory(request: CreateStoryRequestModel, runtime: RuntimeOptions): CreateStoryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/create_story`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetPhotoCountRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetImageCountRequest(description='body', name='body'),
}

model GetPhotoCountModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetImageCountResponse(description='body', name='body'),
}

/**
 * 该接口将返回用户Drive下的云照片个数
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getPhotoCount(request: GetPhotoCountRequestModel, runtime: RuntimeOptions): GetPhotoCountModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/get_photo_count`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetStoryDetailRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetStoryDetailRequest(description='body', name='body'),
}

model GetStoryDetailModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: GetStoryDetailResponse(description='body', name='body'),
}

/**
 * 该接口将会获取故事列表
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getStoryDetail(request: GetStoryDetailRequestModel, runtime: RuntimeOptions): GetStoryDetailModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/get_story_detail`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListAddressGroupsRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageAddressGroupsRequest(description='body', name='body'),
}

model ListAddressGroupsModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageAddressGroupsResponse(description='body', name='body'),
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listAddressGroups(request: ListAddressGroupsRequestModel, runtime: RuntimeOptions): ListAddressGroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_address_groups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFaceGroupsRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageFaceGroupsRequest(description='body', name='body'),
}

model ListFaceGroupsModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageFaceGroupsResponse(description='body', name='body'),
}

/**
 * 该接口将会列举人脸分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFaceGroups(request: ListFaceGroupsRequestModel, runtime: RuntimeOptions): ListFaceGroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_face_groups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListStoryRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListStoryRequest(description='body', name='body'),
}

model ListStoryModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListStoryResponse(description='body', name='body'),
}

/**
 * 该接口将会获取故事列表
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listStory(request: ListStoryRequestModel, runtime: RuntimeOptions): ListStoryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_story`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListTagsRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageTagsRequest(description='body', name='body'),
}

model ListTagsModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: ListImageTagsResponse(description='body', name='body'),
}

/**
 * 该接口将会展示场景标记
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listTags(request: ListTagsRequestModel, runtime: RuntimeOptions): ListTagsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_tags`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchAddressGroupsRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: SearchImageAddressGroupsRequest(description='body', name='body'),
}

model SearchAddressGroupsModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: SearchImageAddressGroupsResponse(description='body', name='body'),
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchAddressGroups(request: SearchAddressGroupsRequestModel, runtime: RuntimeOptions): SearchAddressGroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/search_address_groups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateFacegroupInfoRequestModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateFaceGroupInfoRequest(description='body', name='body'),
}

model UpdateFacegroupInfoModel {
  headers?: map[string]string(description='headers', name='headers'),
  body: UpdateFaceGroupInfoResponse(description='body', name='body'),
}

/**
 * 该接口将会更新人脸分组信息
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateFacegroupInfo(request: UpdateFacegroupInfoRequestModel, runtime: RuntimeOptions): UpdateFacegroupInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/update_facegroup_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.alicloudccp.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.headers
  };

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(request.body);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * 
 */
model Address {
  city?: string(name='city'),
  country?: string(name='country'),
  district?: string(name='district'),
  province?: string(name='province'),
  township?: string(name='township'),
}

/**
 * Create story request
 */
model CreateStoryRequest {
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
}

/**
 * 生成故事
 */
model CreateStoryResponse {
  driveId?: string(name='drive_id'),
}

/**
 * Get photo count request
 */
model GetImageCountRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * 获取云照片个数结果
 */
model GetImageCountResponse {
  imageCount?: long(name='image_count', description='image_count', example=1, format='int64'),
}

/**
 * Get story detail request
 */
model GetStoryDetailRequest {
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  storyId: string(name='story_id', description='story_id', example='"story112312"'),
  videoUrlExpireSec?: long(name='video_url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
}

/**
 * 故事详情
 */
model GetStoryDetailResponse {
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  createdAt?: string(name='created_at', description='created_at'),
  score?: number(name='score', description='score', example=50.5, format='double'),
  storyId?: string(name='story_id', description='story_id', example='"abc"'),
  storyImagesDateRange?: [ integer ](name='story_images_date_range', description='story_images_date_range', items='{"format":"int64","type":"integer"}'),
  subTitle?: string(name='sub_title', description='sub_title', example='"2020"'),
  title?: string(name='title', description='title', example='"历史的今天"'),
  updatedAt?: string(name='updated_at', description='updated_at'),
  videoStatus?: string(name='video_status', description='video_status', enum='creating, available'),
  videoUrl?: string(name='video_url', description='video_url', example='"https://abc.xxx"'),
  items?: [ BaseCCPFileResponse ](name='items', description='items', items='{"$ref":"#/definitions/BaseCCPFileResponse"}'),
}

/**
 * 
 */
model ImageAddressResponse {
  addressDetail?: Address(name='address_detail'),
  count?: long(name='count', description='聚类地点计数', example=1, format='int64'),
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  coverUrl?: string(name='cover_url', description='聚类地点封面图片地址', example='http://imm-dev-wmt/tags/05.jpg?x-oss-process=xxx'),
  location?: string(name='location', description='经纬度', example='39.21211,101.32111'),
  name?: string(name='name', description='聚类地点名称', example='杭州'),
}

/**
 * 
 */
model ImageFaceGroupResponse {
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  createdAt?: string(name='created_at', description='人脸分组生成时间', example='2019-02-20T09:35:51.057Z'),
  faceCount?: long(name='face_count', description='人脸个数', example=2, format='int64'),
  groupCoverUrl?: string(name='group_cover_url', description='人脸分组封面头像地址', example='http://imm-dev-wmt/facegroup/05.jpg?x-oss-process=xxx'),
  groupId?: string(name='group_id', description='人脸分组 ID', example='abc'),
  groupName?: string(name='group_name', description='人脸分组名称', example='abc'),
  imageCount?: long(name='image_count', description='照片个数', example=2, format='int64'),
  updatedAt?: string(name='updated_at', description='人脸分组修改时间', example='2019-02-20T09:35:51.057Z'),
}

/**
 * 
 */
model ImageTagResponse {
  count?: long(name='count', description='聚类标签计数', example=1, format='int64'),
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  coverUrl?: string(name='cover_url', description='聚类标签封面图片地址', example='http://imm-dev-wmt/tags/05.jpg?x-oss-process=xxx'),
  name?: string(name='name', description='聚类标签名称', example='篮球'),
}

/**
 * List image address groups request
 */
model ListImageAddressGroupsRequest {
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
}

/**
 * 展示地点分组集合
 */
model ListImageAddressGroupsResponse {
  items?: [ ImageAddressResponse ](name='items', items='{"$ref":"#/definitions/ImageAddressResponse"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List image face groups request
 */
model ListImageFaceGroupsRequest {
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  limit?: long(name='limit', default=100, description='每页大小限制', example=10, format='int64', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
}

/**
 * 展示人脸分组集合
 */
model ListImageFaceGroupsResponse {
  items?: [ ImageFaceGroupResponse ](name='items', items='{"$ref":"#/definitions/ImageFaceGroupResponse"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List image tags request
 */
model ListImageTagsRequest {
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
}

/**
 * 展示标签集合
 */
model ListImageTagsResponse {
  tags?: [ ImageTagResponse ](name='tags', items='{"$ref":"#/definitions/ImageTagResponse"}'),
}

/**
 * List story request
 */
model ListStoryRequest {
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  limit?: integer(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
}

/**
 * 故事列表
 */
model ListStoryResponse {
  items?: [ StoryResponse ](name='items', description='items', items='{"$ref":"#/definitions/StoryResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker'),
}

/**
 * Search image address groups request
 */
model SearchImageAddressGroupsRequest {
  addressLevel?: string(name='address_level', default='city', description='查询的地点级别', example='city'),
  addressNames?: [ string ](name='address_names', description='查询的地点数组', example='杭州市, 北京市', items='{"type":"string"}'),
  brGeoPoint?: string(name='br_geo_point', description='br_geo_point', example='39.121,101.2121'),
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process
type:string', example='image/resize,w_200'),
  tlGeoPoint?: string(name='tl_geo_point', description='tl_geo_point', example='39.121,101.2121'),
}

/**
 * 展示地点分组列表
 */
model SearchImageAddressGroupsResponse {
  items?: [ ImageAddressResponse ](name='items', items='{"$ref":"#/definitions/ImageAddressResponse"}'),
}

/**
 * 
 */
model StoryResponse {
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  createdAt?: string(name='created_at', description='created_at'),
  score?: number(name='score', description='score', example=50.5, format='double'),
  storyId?: string(name='story_id', description='story_id', example='"abc"'),
  storyImagesDateRange?: [ integer ](name='story_images_date_range', description='story_images_date_range', items='{"format":"int64","type":"integer"}'),
  subTitle?: string(name='sub_title', description='sub_title', example='"2020"'),
  title?: string(name='title', description='title', example='"历史的今天"'),
  updatedAt?: string(name='updated_at', description='updated_at'),
  videoStatus?: string(name='video_status', description='video_status', enum='creating, available'),
  videoUrl?: string(name='video_url', description='video_url', example='"https://abc.xxx"'),
}

/**
 * Update face group info request
 */
model UpdateFaceGroupInfoRequest {
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  groupId: string(name='group_id', description='group_id 列举人脸分组接口中获取', example='"group-asdasdasdeop"'),
  groupName?: string(name='group_name', description='group_name', example='"张XX"'),
}

/**
 * 更新人脸分组信息结果
 */
model UpdateFaceGroupInfoResponse {
  driveId?: string(name='drive_id', description='drive_id', example='"101"'),
  groupId?: string(name='group_id', description='group_id', example='"group-aas11002ddeac"'),
}

/**
 * 
 */
model UrlInfo {
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

function getPathname(nickname: string, path: string): string {
  if (Util.empty(nickname)) {
    return path;
  }
  return `/${nickname}${path}`;
}

async function setExpireTime(expireTime: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setExpireTime(expireTime);
}

function getExpireTime(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var expireTime = @accessTokenCredential.getExpireTime();
  return expireTime;
}

function setRefreshToken(token: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setRefreshToken(token);
}

function getRefreshToken(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var token = @accessTokenCredential.getRefreshToken();
  return token;
}

function setAccessToken(token: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setAccessToken(token);
}

async function getAccessToken(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var token = @accessTokenCredential.getAccessToken();
  return token;
}

function setUserAgent(userAgent: string): void {
  @userAgent = userAgent;
}

function appendUserAgent(userAgent: string): void {
  @userAgent = `${@userAgent} ${userAgent}`;
}

function getUserAgent(): string {
  var userAgent =  Util.getUserAgent(@userAgent);
  return userAgent;
}

async function getAccessKeyId(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var accessKeyId = @credential.getAccessKeyId();
  return accessKeyId;
}

async function getAccessKeySecret(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var secret = @credential.getAccessKeySecret();
  return secret;
}

async function getSecurityToken(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var token = @credential.getSecurityToken();
  return token;
}


